{##																#}
{## Developed for the University of Nottingham G52GRP module 	#}
{##																#}
{## Written by:	Marcus Whybrow (mxw18u) 						#}
{## Group: 		gp09-drm 										#}
{##																#}

{% extends "books/base.html" %}

{% block title %}
Books Statistics | {{ block.super }}
{% endblock %}

{% block page_title %}books-book-list{% endblock %}

{% block breadcrumbs %}
{{ block.super }}
<li id="bc-books-book-list"><a href="{% url book_list %}">Books</a></li>
{% endblock %}

{% block content %}
	<div class="section">
		<div class="inner">
			{% for score in score_dict %}
				{{ score.score }}
			{% endfor %}
			<h2>Books</h2>
			<p>Here is a list of all the books currently held within the AutoLibrarian system.</p>
		</div>
	</div>
	<div class="section">
		<div class="inner">
			<div class="rounded-wrapper">
				<ul class="item-list">
					{% for book in books.object_list %}
						<li id="{{ book.pk }}">
							<a class="item-title" href="{{ book.get_absolute_url }}">{{ book.title }}</a>
							<span class="item-children-count">{{ book.added|date }}</span>
						</li>
					{% endfor %}
				</ul>
			</div>
			
			<div class="pagination">
			    <span class="step-links">
			        {% if books.has_previous %}
			            <a href="{% url book_list books.previous_page_number %}">previous</a>
			        {% endif %}
			
			        <span class="current">
			            Page {{ books.number }} of {{ books.paginator.num_pages }}
			        </span>
			
			        {% if books.has_next %}
			            <a href="{% url book_list books.next_page_number %}">next</a>
			        {% endif %}
			    </span>
			</div>
		</div>
	</div>
{% endblock %}
